#ifndef tower_h_
#define tower_h_

#include <list>
#include <iostream>
#include "SDL/SDL.h"
#include "SDL/SDL_opengl.h"
#include "unit.h"
#include "globaldef.h"

using std::list;

class tower
{
  public:
    tower(); //Lets hope no one ever calls this
    tower(int nx, int ny, int nang = 0, int nwidth = 64, int nheight = 64);
    ~tower();

    //graphics
    void draw();
    virtual GLuint gettex();

    void updateTarget(list<unit*> & l);

    //private:
    static GLuint tex; // handle to texture
    int ang;
    int x;
    int y;
    int width;
    int height;
    int range;
    int maxfirecd;
    int firecd;
    unit* target;
};


#endif
